package org.database.filter.service.impl;

import java.util.List;

import org.database.filter.model.Excel;
import org.database.filter.repository.EXCELRepository;
import org.database.filter.service.ExcelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
@Service
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
public class ExcelServiceImpl implements ExcelService{
	@Autowired
	private EXCELRepository excelRepository;
	@Override
	public List<Excel> getAll() {
		return excelRepository.findAll();
	}
	
	public void saveOrUpdate(Excel excel) {
		excelRepository.save(excel);
	}

}
